# $Id: PKGBUILD 162749 2012-06-29 12:15:20Z pierre $
# Maintainer:
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=lynx
pkgver=2.8.7
_pkgver=2-8-7
pkgrel=6
pkgdesc="A text browser for the World Wide Web(no ssl & ipv6)"
url="http://lynx.isc.org/"
arch=(sh4)
license=('GPL')
depends=('ncurses')
backup=('etc/lynx.cfg')
source=("http://lynx.isc.org/release/${pkgname}${pkgver}.tar.gz")
md5sums=('e36d70f3f09b2d502055ca67f09e363c')

build() {
  cd ${srcdir}/${pkgname}${_pkgver}
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --without-ssl \
    --enable-nls \
    --disable-ipv6 \
    --mandir=/usr/share/man
  make
}

package() {
  cd ${srcdir}/${pkgname}${_pkgver}
  make DESTDIR=${pkgdir} install

  # FS#20404 - points to local help
  sed -i -e "s|^HELPFILE.*$|HELPFILE:file:///usr/share/doc/lynx/lynx_help/lynx_help_main.html|" ${pkgdir}/etc/lynx.cfg

  install -d ${pkgdir}/usr/share/doc/lynx
  cp -rf lynx_help ${pkgdir}/usr/share/doc/lynx
}
